<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="./home.css/home.css">
    <link rel="stylesheet" href="./字体图标/font_izaymq8lc8/iconfont.css">
</head>

<body>
    <header>
        <div>
            <span>首页</span>
        </div>
    </header>
    <main>
        <div class="content1">
            <div><img src="./home.img/1.png" alt=""></div>
            <div><img src="./home.img/2.png" alt=""></div>
            <div><img src="./home.img/3.png" alt=""></div>
            <div><img src="./home.img/4.png" alt=""></div>
        </div>

        <div class="content2">
            <p><span>常用功能</span></p>
            <div>
                <div id="staff">
                    <p class="iconfont">&#xe633;</p>
                    <p>我的客户</p>
                </div>
                <div id="NewStaff">
                    <p class="iconfont">&#xe695;</p>
                    <p>新增客户</p>
                </div>
                <div id="business">
                    <p class="iconfont">&#xe8c8;</p>
                    <p>新增商机</p>
                </div>
                <div id="NewContract">
                    <p class="iconfont">&#xe623;</p>
                    <p>新增合同</p>
                </div>
                <div id="CollectMoney">
                    <p class="iconfont">&#xe6fe;</p>
                    <p>回款管理</p>
                </div>
                <div id="CustomerAnalytics">
                    <p class="iconfont">&#xe6b3;</p>
                    <p>客户分析</p>
                </div>
            </div>
        </div>

        <div class="content3">
            <div>
                <p>
                    <span>公告</span>
                    <span><a href="../公告/Announcement-page.html">更多>></a></span>
                </p>
                <div>
                    <ul>
                        <li><span> <a href="../公告/Announcement-details.html?id=1 ">一、什么是js，js能做什么，为什么要用js</a></span></li>
                        <li><span> <a href="../公告/Announcement-details.html">公告2</a></span></li>
                        <li><span> <a href="../公告/Announcement-details.html">公告3</a></span></li>
                    </ul>
                </div>
            </div>
            <div>
                <p>商机跟进</p>
                <div>
                    <ul>
                        <!-- 跳转到商机管理 -->
                        <li><span> <a href="#">初步洽谈</a></span></li>
                        <!-- 跳转到商机管理 -->
                        <li><span> <a href="#">深入沟通</a></span></li>
                        <!-- 跳转到商机管理 -->
                        <li><span> <a href="#">产品报价</a></span></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="content4">
            <span>客户签约排行</span>
        </div>

        <div class="content5">
        </div>
    </main>
    <script src="./home.js/jQuery.js"></script>
    <script src="./home.js/home.js"></script>
    <script type="text/javascript">
        let staff = document.getElementById("staff");  //点击“我的客户”->客户管理  我的客户
        staff.onclick = function () {
            window.location.href = "../../connection/connection.html";
        }
        let NewStaff = document.getElementById("NewStaff");  //点击“新增客户”->客户管理   我的客户  新增客户
        NewStaff.onclick = function () {
            window.location.href = "../../connection/addConnection.html";
        }
        let business = document.getElementById("business");  //点击“新增商机”->合同管理  商机管理  新增商机
        business.onclick = function () {
            window.location.href = "#";
        }
        let NewContract = document.getElementById("NewContract");  //点击“新增合同”->合同管理  合同列表  新增合同
        NewContract.onclick = function () {
            window.location.href = "../../contract/contract/contractList.html";
        }
        let CollectMoney = document.getElementById("CollectMoney");  //点击“回款管理”->合同管理  回款管理
        CollectMoney.onclick = function () {
            window.location.href = "../../contract/refund/reManage.html";
        }
        let CustomerAnalytics = document.getElementById("CustomerAnalytics");  //点击“客户分析”->合同管理  统计分析  客户分析
        CustomerAnalytics.onclick = function () {
            window.location.href = "#";
        }

        function detail() {
        let data = JSON.parse(localStorage.getItem("data1"));
        $("#announcement").html("");
        let fragment = document.createDocumentFragment();
        let id = (window.location.search).split("?id=")[1]-1;
            let div = document.createElement("div");
            div.innerHTML = `
            <h2>${data[id].title}</h2>
        <p class="p1">
            <span>发布人:</span>
            <span>张三</span>
            <span>发布时间：</span>
            <span>${data[id].time}</span>
        </p>
        <p class="p2">
            ${data[id].announcement}
        </p>
        `;
            fragment.appendChild(div);
        $("#announcement").append(fragment);
    }
    </script>
</body>

</html>